package com.project.ds;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import com.dtyunxi.ds.BaseMapper;
import com.project.ds.sqlprovider.ActivityMapperProvider;
import com.project.entity.activity.Activity;

/**
 * 活动实体类Mybatis接口类
 * @author chenlz
 *
 */
@Mapper
public interface ActivityMapper extends BaseMapper<Activity> {

	/**
	 * 获取不带分页的数据
	 * @param capitalBookDto
	 * @return
	 */
	@SelectProvider(type=ActivityMapperProvider.class,method="queryAllList")
	public List<Activity> queryAllList(Activity activity);

	/**
	 * 获取带分页的数据
	 * @param activity
	 * @param pageSize
	 * @param pageNo
	 * @return
	 */
	@SelectProvider(type=ActivityMapperProvider.class,method="queryList")
	public List<Activity> queryList(Activity activity, int pageSize, int pageNo);
	
	/**
	 * 查询总条数
	 * @param activity
	 * @return
	 */
	@SelectProvider(type=ActivityMapperProvider.class,method="queryCount")
	public int queryCount(Activity activity);
	
	/**
	 * 获取带分页的数据
	 * @param activity
	 * @param pageSize
	 * @param pageNo
	 * @return
	 */
	@SelectProvider(type=ActivityMapperProvider.class,method="queryPageData")
	public List<Activity> queryPageData(Activity activity, int pageSize, int pageNo);
	
	/**
	 * 活动详情
	 * @author chen.liangzhen
	 * @time 2017年4月5日 下午4:45:18
	 * @version
	 * @param activityId
	 * @return
	 */
	@SelectProvider(type=ActivityMapperProvider.class,method="queryById")
	public Activity queryById(@Param("activityId")Long activityId, @Param("userId")Long userId);
	
	/**
     * 活动详情(未登录)
     * @version
     * @param activityId
     * @return
     */
    @SelectProvider(type=ActivityMapperProvider.class,method="findActivityById")
    public Activity findActivityById(@Param("activityId")Long activityId);
	
}